/*******************************************************************************
 *
 *      Filename: GLWindow.h
 *   Description: 
 *        Author: [kb]ypp
 *    Created at: November 19, 2005
 * Last modified: December 24, 2005
 *
 ******************************************************************************/

#ifndef GLWINDOW_H
#define GLWINDOW_H

#include <string>

class Application;

//! @brief Class to create and manage OpenGL-capable window
//!
//! All OS-dependent data is stored in `impl' member data, wich must be
//! defined for Windows and Linux
class GLWindow {
public:
	//! @brief Constructor
	GLWindow( Application &owner, int width, int height, bool fs );
	//! @brief Destructor
	~GLWindow();
	
	//! @brief Set the name (title) for the window
	void title( const std::string &title );
	//! @brief Process current pending events and return
	void processEvents();
	//! @brief Swap back and front buffers
	void swapBuffers() const;
	
private:
	//! @brief Copy-construction disabled
	GLWindow( const GLWindow& );
	//! @brief Assignment disabled
	const GLWindow& operator=( const GLWindow& );
	
	Application &owner_;
	std::string title_;
	int width_;
	int height_;
	bool fullscreen_;
	
	struct GLWindowImpl;
	GLWindowImpl *impl_; //!< Encapsulates all OS-dependent data
};

#endif // GLWINDOW_H
